const stream = require('stream');
const writable = new stream.Writable({
    write: function (chunk, encoding, next) {
        console.log(chunk.toString());
        next();
    }
});
writable.write('天气晴朗');
//cork  将数据暂存起来，当调用uncork方法时，将暂存的数据一次性传给使用者
writable.cork();
writable.write('阳光明媚');
writable.write('阳光明媚2');
writable.uncork();
writable.end();